package com.javaweb.entity;

import java.util.Date;
import java.util.Objects;

/**
 * Vote detail made by user for favorite teacher.
 */
public class VoteDetail {
    private int id;
    private int teacherId;
    private int userId;
    private Date voteTime;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getTeacherId() {
        return teacherId;
    }

    public void setTeacherId(int teacherId) {
        this.teacherId = teacherId;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public Date getVoteTime() {
        return voteTime;
    }

    public void setVoteTime(Date voteTime) {
        this.voteTime = voteTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof VoteDetail)) return false;
        VoteDetail that = (VoteDetail) o;
        return id == that.id &&
                teacherId == that.teacherId &&
                userId == that.userId &&
                voteTime.equals(that.voteTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, teacherId, userId, voteTime);
    }
}



